package com.ruoyi.sl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sl.mapper.SlWerrorMapper;
import com.ruoyi.sl.domain.SlWerror;
import com.ruoyi.sl.service.ISlWerrorService;

/**
 * 工作绩效Service业务层处理
 * 
 * @author admin
 * @date 2024-06-14
 */
@Service
public class SlWerrorServiceImpl implements ISlWerrorService 
{
    @Autowired
    private SlWerrorMapper slWerrorMapper;

    /**
     * 查询工作绩效
     * 
     * @param werrorId 工作绩效主键
     * @return 工作绩效
     */
    @Override
    public SlWerror selectSlWerrorByWerrorId(Long werrorId)
    {
        return slWerrorMapper.selectSlWerrorByWerrorId(werrorId);
    }

    /**
     * 查询工作绩效
     *
     * @param userName 用户名
     * @return 工作绩效
     */
    @Override
    public List<SlWerror> selectSlWerrorByUserName(String userName){
        return slWerrorMapper.selectSlWerrorByUserName(userName);
    }

    /**
     * 查询工作绩效列表
     * 
     * @param slWerror 工作绩效
     * @return 工作绩效
     */
    @Override
    public List<SlWerror> selectSlWerrorList(SlWerror slWerror)
    {
        return slWerrorMapper.selectSlWerrorList(slWerror);
    }

    /**
     * 新增工作绩效
     * 
     * @param slWerror 工作绩效
     * @return 结果
     */
    @Override
    public int insertSlWerror(SlWerror slWerror)
    {
        slWerror.setCreateTime(DateUtils.getNowDate());
        return slWerrorMapper.insertSlWerror(slWerror);
    }

    /**
     * 修改工作绩效
     * 
     * @param slWerror 工作绩效
     * @return 结果
     */
    @Override
    public int updateSlWerror(SlWerror slWerror)
    {
        slWerror.setUpdateTime(DateUtils.getNowDate());
        return slWerrorMapper.updateSlWerror(slWerror);
    }

    /**
     * 批量删除工作绩效
     * 
     * @param werrorIds 需要删除的工作绩效主键
     * @return 结果
     */
    @Override
    public int deleteSlWerrorByWerrorIds(Long[] werrorIds)
    {
        return slWerrorMapper.deleteSlWerrorByWerrorIds(werrorIds);
    }

    /**
     * 删除工作绩效信息
     * 
     * @param werrorId 工作绩效主键
     * @return 结果
     */
    @Override
    public int deleteSlWerrorByWerrorId(Long werrorId)
    {
        return slWerrorMapper.deleteSlWerrorByWerrorId(werrorId);
    }
}
